# Author    :Dun_Hz
# Time      :2024/3/13 20:59
# 水仙花数
x = 100
while x<1000:
    a = x//100
    b = (x-a*100)//10
    c = x-a*100-b*10
    if x == a**3+b**3+c**3:
        print(x)
    x += 1
# 方式二，辗转相除法
for i in range(0,10001):
    temp = i
    sum = 0
    a = len(str(i))
    while temp:
        sum +=(temp%10)**a
        temp = temp//10
    if sum == i:
        print(i,end=',')